package com.lxh.lxhcrm.model.pojos;

import javax.persistence.*;
import java.util.Objects;

/**
 * @author ：鞠玮
 * 开发团队 ：lxh
 * 开发时间 ：2020/1/30 17:24
 * 类的名称 ：ConClassify
 * 类的描述 ：合同分类
 */
@Entity
@Table(name = "con_classify", schema = "lxh_crm", catalog = "")
public class ConClassify {
    private int id;
    private String name;
    private String describe;
    private Integer isOn;

    @Id
    @Column(name = "_id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "_name", nullable = true, length = 40)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "_describe", nullable = true, length = -1)
    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    @Basic
    @Column(name = "is_on", nullable = true)
    public Integer getIsOn() {
        return isOn;
    }

    public void setIsOn(Integer isOn) {
        this.isOn = isOn;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ConClassify that = (ConClassify) o;
        return id == that.id &&
                Objects.equals(name, that.name) &&
                Objects.equals(describe, that.describe) &&
                Objects.equals(isOn, that.isOn);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, name, describe, isOn);
    }
}
